﻿/*----------------------------------------------------
 * Author : Tharinduni Udugamasuriya
 * Date : July 2014
 * IMasterReadService : Interface of MasterReadService
 ---------------------------------------------------*/

using System.Data;

namespace DSPL.Contracts.Interfaces
{
    public interface IReadService
    {
        DataTable GetAllMasterData(string tableName);

        DataTable GetAllMasterDataTopRecords(string tableName, int numberOfRecPerPage);

        DataTable GetDummyRecord(string tableName);

        DataTable GetDuplicates(string tableName, IColumnWithValue[] UniqueKeyList);

        object CheckValidityOfDeletion(string tableName, int primaryKey,string primaryFieldName, string ingnoreTableList = "");

        int GetPrimaryKeyValue(string tableName, string keyFieldName, string keyFieldValue,string primaryKeyFieldName);

        string GetUniqueCodeValue(string tableName, string primaryKeyFieldName, string keyFieldValue, string KeyFieldName);

        DataTable GetAllMasterDataByHelpName(HelpNames helpName);

        DataTable GetAllTransactionData(string tableName, string primaryKeyFieldName);

        DataTable GetParentTransactionData(string parentTableName, string primaryKeyField, object primaryKeyValue);

        DataTable GetChildTransactionData(string childTableName, string primaryKeyField, object primaryKeyValue);

        DataTable GetChildTransactionData(HelpNames childGridHelpName, object primaryKeyValue);

        DataRow GetPreviousOrNextTransactionRecord(string tableName, int primaryKey, string primaryKeyField, bool isLast);

    }
}
